import java.util.ArrayDeque;

/**
 * Author: Daniel Michalski
 * Date: 10.03.13
 */

public class ArrayDequeTest {
    public static void main(String[] args) {
        ArrayDeque<String> adq = new ArrayDeque<String>();

        adq.push("A");
        adq.push("B");
        adq.push("D");
        adq.push("E");
        adq.push("F");

        System.out.println("Kolejne elementy zdejmowane ze stosu:");

        while (adq.peek() != null)
            System.out.print(adq.pop() + " ");
    }
}
